package com.project.dao;

import com.project.entity.School;

import java.util.List;

public interface SchoolMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(School record);

    int insertSelective(School record);

    School selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(School record);

    int updateByPrimaryKey(School record);

    /**
     * author: WheelChen
     * date: 2017/7/11
     * function: 根据universityid寻找学院信息
     *
     * @param universityid 大学id
     * @return
     */
    List<School> selectByUniversityId(Integer universityid);

    /**
     * author: WheelChen
     * date: 2017/7/11
     * function: 根据大学id和学院名称查找学院是否已存在
     *
     * @param school
     * @return 返回查找到的记录数
     */
    int checkUniversityIdAndNameIsExist(School school);

}